
<?php if($sf_params->get('dialog_mode')):?>
  <div id="divContactDialogButton" style="text-align:center;padding-top:5px;">
    <?php if($sf_params->get('dialog_mode')==='invoice'):?>
      <?php
        echo
          button_to_remote(
            'Invoice',
            array(
              'url'=>'invoice/create?contact_iden='.$contactForm->getObject()->getIden(),
              'update'=>sfConfig::get('app_windows_main_id'),
              'loading'=>"$('indicator').show();",
              'complete'=>"$('indicator').hide();".
                 "Element.show('divInvoiceDrSearchBox');".
                 "Element.show('divInvoiceDrMain');".
                 "Element.hide('divShowSearchInvoice');".
                 "Element.hide('divInvoiceDrPrompt');".
                 "Element.hide('divInvoiceDrSearchGrid');".
                 "Element.show('divInvoiceDr');",
            )
          );
      ?>
    <?php elseif($sf_params->get('dialog_mode')==='payment'):?>
      <?php
        echo
          button_to_remote(
            'Payment',
            array(
              'url'=>'payment/create?contact_iden='.$contactForm->getObject()->getIden(),
              'update'=>sfConfig::get('app_windows_main_id'),
              'loading'=>"$('indicator').show();",
              'complete'=>"$('indicator').hide();",
            )
          );
      ?>
    <?php elseif($sf_params->get('dialog_mode')==='debit_memo'):?>
      <?php
        echo
          button_to_remote(
            'Debit Memo',
            array(
              'url'=>'debitMemo/create?contact_iden='.$contactForm->getObject()->getIden(),
              'update'=>sfConfig::get('app_windows_main_id'),
              'loading'=>"$('indicator').show();",
              'complete'=>"$('indicator').hide();",
            )
          );
      ?>
    <?php elseif($sf_params->get('dialog_mode')==='credit_memo'):?>
      <?php
        echo
          button_to_remote(
            'Credit Memo',
            array(
              'url'=>'creditMemo/create?contact_iden='.$contactForm->getObject()->getIden(),
              'update'=>sfConfig::get('app_windows_main_id'),
              'loading'=>"$('indicator').show();",
              'complete'=>"$('indicator').hide();",
            )
          );
      ?>
    <?php endif;?>
  </div>
<?php endif;?>
